package cn.pengpeng;

import org.apache.hadoop.io.Writable;

import java.sql.PreparedStatement;
import java.sql.SQLException;

public abstract class MySQLOutputWritable implements Writable {

    /**
     * 获取插入或更新语句
     * @return
     */
    public abstract String fetchInsertOrUpdateSql();

    /**
     * 设置数据输出参数
     * @param pstmt
     * @throws SQLException
     */
    public abstract void setPreparedStatementParameters(PreparedStatement pstmt) throws SQLException;
}